home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat4 / elf.z / elf
Encoding:
Text File  |  1998-10-30  |  5.2 KB  |  132 lines

  1.  
  2.  
  3.  
  4. EEEELLLLFFFF((((4444))))                                                                  EEEELLLLFFFF((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      elf - Executable and Linking Format (ELF) files
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<eeeellllffff....hhhh>>>>
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The file name _a._o_u_t is the default ELF-format output file name from the
  16.      link editor _l_d(1).  The link editor will make an _a._o_u_t executable if
  17.      there were no errors and no unresolved external references.
  18.  
  19.      Programs that manipulate ELF files may use the library described in
  20.      _e_l_f(3E).  An overview of the file format follows.  For more complete
  21.      information, see the references given below.
  22.  
  23.                LLLLiiiinnnnkkkkiiiinnnngggg VVVViiiieeeewwww           EEEExxxxeeeeccccuuuuttttiiiioooonnnn VVVViiiieeeewwww
  24.                ELF header             ELF header
  25.                Program header table   Program header table
  26.                (optional)
  27.                Section 1              Segment 1
  28.                 ...                    ...
  29.                Section _n              Segment _n
  30.                Section header table   Section header table
  31.                                       (optional)
  32.  
  33.      An ELF header resides at the beginning and holds a ``road map''
  34.      describing the file's organization.  Sections hold the bulk of object
  35.      file information for the linking view:  instructions, data, symbol table,
  36.      relocation information, and so on.  Segments hold the object file
  37.      information for the program execution view.  A segment may contain one or
  38.      more sections.
  39.  
  40.      A program header table, if present, tells the system how to create a
  41.      process image.  Files used to build a process image (execute a program)
  42.      must have a program header table; relocatable files do not need one.  A
  43.      section header table contains information describing the file's sections.
  44.      Every section has an entry in the table; each entry gives information
  45.      such as the section name, the section size, etc.  Files used during
  46.      linking must have a section header table; other object files may or may
  47.      not have one.  SGI executables and DSO files will be created with section
  48.      header tables, so their absence in an object file, while not prohibited,
  49.      may disable various tools.
  50.  
  51.      Although the table above shows the program header table immediately after
  52.      the ELF header, and the section header table following the sections,
  53.      actual files may differ.  Moreover, sections and segments have no
  54.      specified order.  Only the ELF header has a fixed position in the file.
  55.  
  56.      When an _a._o_u_t file is loaded into memory for execution, three kinds of
  57.      logical segments are set up:  the text segment, the data segment
  58.      (initialized data followed by uninitialized, the latter actually being
  59.      initialized to all 0's), and a stack.  A program can have multiple text
  60.  
  61.  
  62.                                                                         PPPPaaaaggggeeee 1111
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. EEEELLLLFFFF((((4444))))                                                                  EEEELLLLFFFF((((4444))))
  70.  
  71.  
  72.  
  73.      and data segments but only one stack segment.  The text segments are not
  74.      writable by the program; if other processes are executing the same _a._o_u_t
  75.      file, the processes will share the same text segments.
  76.  
  77.      The first data segment generally starts at the next maximal page boundary
  78.      past the last text address.  If the system supports more than one page
  79.      size, the ``maximal page'' is the largest supported size.  When the
  80.      process image is created, the part of the file holding the end of text
  81.      and the beginning of data may appear twice.  The duplicated chunk of text
  82.      that appears at the beginning of data is never executed; it is duplicated
  83.      so that the operating system may bring in pieces of the file in multiples
  84.      of the actual page size without having to realign the beginning of the
  85.      data section to a page boundary.  Therefore, the first data address is
  86.      the sum of the next maximal page boundary past the end of text plus the
  87.      remainder of the last text address divided by the maximal page size.  If
  88.      the last text address is a multiple of the maximal page size, no
  89.      duplication is necessary.  The stack is extended automatically as
  90.      required.  The last data segment is extended as requested by the _b_r_k(2)
  91.      system call.
  92.  
  93. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  94.      as(1), cc(1), ld(1), brk(2), a.out(4)
  95.      _I_R_I_X _S_y_s_t_e_m _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  96.  
  97. NNNNOOOOTTTTEEEESSSS
  98.      ELF is the executable and object file format used on IRIX 5 and later
  99.      systems.
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                                                         PPPPaaaaggggeeee 2222
  129.  
  130.  
  131.  
  132.